import {requestGet} from "./request";

let baseUrl = '/alarm-statistic'

export async function getAbnormal({channel, start, end, channel_type}) {
	return await requestGet(`${baseUrl}/classification/`, {
		channel,
		start,
		end,
		channel_type
	})
}

export async function getTopX({start, end, x = 5, channel_type}) {
	return await requestGet(`${baseUrl}/topx/`, {
		start, end, x, channel_type
	})
}

export async function getAlarmStatisticTotal({channel, start, end}) {
	return await requestGet(`${baseUrl}/total/`, {channel, start, end})
}

export async function getAlamStatisticStep({channel, start, end, step}) {
	return await requestGet(`${baseUrl}/step/`, {channel, start, end, step})
}
